home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / objtba.zip / MMGR.MNL < prev    next >
Text File  |  1993-01-04  |  25KB  |  560 lines

  1.    
  2.    
  3.                 Mail Manager Users & Programming Guide   Page  1    
  4.    
  5.    
  6.    
  7.    
  8.    
  9.    
  10.    
  11.    
  12.    
  13.    
  14.    
  15.         ************************************************************
  16.         *                                                          *
  17.         *            --<<<  MAIL LIST MANAGER  >>>--               *
  18.         *               Demonstration Program for                  *
  19.         *                      ObjectBase                          *
  20.         *  The Object Oriented Data Base Management Tool Box for   *
  21.         *                Turbo Pascal version 5.5.                 *
  22.         *                         and                              *
  23.         *                    ObjectInterFace                       *
  24.         *     The Object Oriented User Interface Tool Box for      *
  25.         *                Turbo pascal version 5.5                  *
  26.         *                    COPYRIGHT NOTICE                      *
  27.         *                                                          *
  28.         *         MMGR.EXE, MMGR.PAS, OopBase.TPU ToolBox and      *
  29.         *         DBObjt.TPU ToolBox and the documentation         *
  30.         *         included are (c) 1990 Thomas W. Harden,          *
  31.         *         all rights reserved.                             *
  32.         *                                                          *
  33.         *         OopBase.TPU & DBObjt.TPU--ToolBoxes are          *
  34.         *         Shareware products and are made available        *
  35.         *         to the programmer to test and use for            *
  36.         *         evaluation purposes only. They may not be        *
  37.         *         circulated in any incomplete or modified         *
  38.         *         form, nor sold for profit, without the           *
  39.         *         express written consent of the author.           *
  40.         *                                                          *
  41.         ************************************************************
  42.        
  43.    
  44.                 Mail Manager Users & Programming Guide   Page  2    
  45.    
  46.    
  47.    
  48.    SHAREWARE NOTICE:
  49.    
  50.    OopBase.TPU & DBObjt.TPU ToolBoxes (ObjectBase) are Shareware 
  51.    products and are made available to the programmer to test and use 
  52.    for evaluation purposes only.  Should you find them useful, 
  53.    register your use with Harden Consulting so update information 
  54.    and future product offerings can be made available to you.  To 
  55.    register your use of the above mentioned products, send check or 
  56.    money order for $79.95 payable to Thomas W.  Harden or Harden 
  57.    Consulting and the form found at the end of this documentation.  
  58.    When Registration is received you will receive the latest version 
  59.    of ObjectBase (See specifications section for current 
  60.    enhancements),  full documentation plus announcements of upgrades 
  61.    will be mailed to you with special pricing made available to 
  62.    registered owners.
  63.    
  64.    
  65.    
  66.    DISCLAIMER:
  67.    
  68.    You undertake the use of MMGR.EXE, OopBase.TPU and DBObjt.TPU at 
  69.    your own risk.  The Author and Harden Consulting accept no 
  70.    liability for any damages resulting from its use or misuse.  
  71.    Problem reports and suggestions are appreciated.  If you are a 
  72.    registered user please notify Harden Consulting at the following 
  73.    address:
  74.    
  75.                            Harden Consulting
  76.                            48 Red Post Crescent
  77.                            Fairport, NY  14450
  78.     
  79.    or leave a message on the Compuserve network: ID 76317,2503.
  80.        
  81.    
  82.                 Mail Manager Users & Programming Guide   Page  3    
  83.    
  84.    
  85.    
  86.                            INTRODUCTION
  87.    
  88.      The Mail List Manager program included in this package is a 
  89.      demonstration program written in turbo Pascal v 5.5 to 
  90.      demonstrate two software developement tool boxes: ObjectBase 
  91.      and ObjectInterFace.  The documentation includes two sections: 
  92.      A Mail List Manager User's Guide and Programmers Guide.
  93.    
  94.      The program can be run on any IBM PC,XT,AT or compatible with a 
  95.      minimum of 256k memory that uses DOS 2.0 or higher.  A minimum 
  96.      of one disk drive is required. 
  97.    
  98.      Mail List Manager makes extensive use of Pop up windows and 
  99.      menus to operate the program.  It has context sensitive help 
  100.      available at all times by pressing <F1>.
  101.    
  102.    
  103.        
  104.    
  105.                 Mail Manager Users & Programming Guide   Page  4    
  106.    
  107.    
  108.    
  109.                               USER GUIDE
  110.    
  111.    OVERVIEW
  112.    ================================================================
  113.    
  114.         The intent of Mail List Manager is to allow the user to 
  115.         easily maintain information concerning companys and the 
  116.         contacts within those companies with whom the user might 
  117.         want to communicate on a reqular basis.  The user will have 
  118.         to enter information concerning those companies and 
  119.         individuals and also how they relate to each other. Mail 
  120.         List Manager allows the user to view this information either 
  121.         on screen in a form view or report type format and print 
  122.         mailing lists and reports concerning the information 
  123.         contained in the system.  This is all accomplished through a 
  124.         series of Menus and Forms that are presented to the user to 
  125.         allow for quick and easy access to all the functions of the 
  126.         program.
  127.    
  128.        
  129.    
  130.                 Mail Manager Users & Programming Guide   Page  5    
  131.    
  132.    
  133.    INSTALLATION
  134.    
  135.      Files required.
  136.    
  137.         In order run Mail List Manager the following files must be 
  138.         available in the current directory:
  139.         
  140.                           MMGR.EXE        The program file.
  141.                           MMGR.HLP        The help file for use by 
  142.                                           the context sensitive help 
  143.                                           system.
  144.      Copying the files.
  145.    
  146.         Copy MMGR.EXE to the disk and directory from which you would
  147.         like to work.
  148.    
  149.         At the DOS Prompt( d:>) type : 
  150.                     COPY [path]MMGR.EXE [path]<Cr>
  151.         Note: '[ ]' = Optional; 'path' = Drive letter ':\' 
  152.               directory.
  153.         Copy MMGR.HLP to the disk and directory from which you would 
  154.         like to work.
  155.    
  156.         At the DOS Prompt( d:>) type : 
  157.                     COPY [path]MMGR.HLP [path]<Cr>
  158.    
  159.      Directories
  160.    
  161.         Mail List Manager is set-up to use the current drive or 
  162.         directory for the storage of the system configuration, data, 
  163.         and index files that it generates.  The program also goes to 
  164.         this area to find the Help file.  This means that what ever 
  165.         is the current directory when you start the program the help 
  166.         file (MMGR.HLP), The Data files (*.DAT), The Index files 
  167.         (*.NDX) and the Configuration files (*.CNF) should be in 
  168.         that directory.  This may be accomplished by the command:
  169.         CD path <Cr> where path is the drive and directory where the 
  170.         above files are located.
  171.    
  172.      Screen appearence.
  173.    
  174.         When Mail List Manager is started it automaticly determines 
  175.         the monitor type that is in use.  If their might be some 
  176.         confusion between a CGA or LCD monitor it will ask which 
  177.         monitor type you have.  Default colors are set at that time. 
  178.          If you would like to change the default color values you 
  179.         may accomplish this through the menu system.
  180.    
  181.        
  182.    
  183.                 Mail Manager Users & Programming Guide   Page  6    
  184.    
  185.    
  186.    STARTING THE PROGRAM
  187.    
  188.      Loading the program
  189.    
  190.         To load and run Mail List Manager type MMGR<Cr> at the DOS 
  191.         prompt and your on your way.
  192.    
  193.      Possible problems
  194.    
  195.         If you have run the program before and all files required by 
  196.         the program have been created and messages are displayed 
  197.         suggesting that those files are not present, you have 
  198.         probably started the program from a directory that does not 
  199.         contain the requiset files. <Ctrl Brk> will stop the program 
  200.         and then you can Change Directory to the directory or drive 
  201.         where these files reside and restart the program.
  202.    
  203.    OPERATION OF PROGRAM
  204.    
  205.      Help System
  206.    
  207.         The Mail List Manager help system is context sensitive and is always 
  208.         available by hitting the <F1> key.  You may move through the 
  209.         available information with the <PgDn> and <PgUp> keys.  
  210.         <Esc> exits Help.
  211.    
  212.      Menu System
  213.    
  214.         The Mail List Manager Menu System is a Pop Up Menu system that is both 
  215.         quick and helpful.  You may select an option by any of three 
  216.         methods.  You may highlight an option by using the <Up> and 
  217.         <Down> arrow, <End>, or <Home> keys to move the highlight 
  218.         bar and when the desired option is highlighted strike <Cr>. 
  219.         You may hit the key that is highlighted in the desired 
  220.         option and it will be executed immediately. You may also hit 
  221.         the numeric key that corresponds to the position of the 
  222.         desired option and it will be executed immediately. <Esc> 
  223.         exits that menu and returns you to the previous menu.
  224.    
  225.        
  226.    
  227.                 Mail Manager Users & Programming Guide   Page  7    
  228.    
  229.    
  230.    MENU TREE
  231.                                                                  
  232.                                                                  
  233.                                     +>PERSON SEARCH          
  234.                                     |  Correct person  +>CONTACT DELETE
  235.                                     |  Next person     |  Del relation
  236.                                     |  Prev person     |  Next relation
  237.                                     |  Add person      |  Abort delete
  238.                   +>COMPANY MAINT   |  Quit search     |
  239.                   |  Edit company   |+-----------------++
  240.                   |  Find company   || +>PERSON MAINT  | >COMPANY SEARCH
  241.                   |  Next company   || |  Edit person  | | Correct comp
  242.                   |  Prev company   || |  Find person  | | Next company
  243.                   |  Add company    || |  Next person  | | Prev company
  244.                   |  Select/deSelect|| |  Prev person  | | Add company
  245.                   |  Contact add  --+| |  Add person   | | Quit search
  246.                   |  cOntact next    | |  Select/deSelect|
  247.                   |  Del contact  ---+ |  Contact add ---+
  248.                   |  Quit company maint|  cOntact next |
  249.                   |                    |  Del contact -+
  250.                   |               +----+  Quit person maint
  251.    MAIN MENU      |               |
  252.     Company maint +                | +->LABELS MENU
  253.     Person maint ------------------+ |   Contacts @company
  254.     Reports --------->REPORTS MENU   |   cOmpany report
  255.     Utilities ---+     Mail labels --+   Quit labels
  256.     Quit Program |     Company report -+
  257.                  |     conTact report  +----->COMPANY REPORTS
  258.                  |     Quit reports           w/ Contacts
  259.                  |                            w/O contacts
  260.                  +>UTILITY MENU               Quit company reports
  261.                     Screen colors
  262.                     saVe data
  263.                     Quit utility
  264.    
  265.        
  266.    
  267.                 Mail Manager Users & Programming Guide   Page  8    
  268.    
  269.    
  270.      Using The Screen Forms
  271.    
  272.         When editing data within the screen forms that are 
  273.         presented, you will be prompted for the data that is 
  274.         required, proper formatting is automatically handled.  
  275.         Movement between fields is accomplished by the <Up> and 
  276.         <Down> arrows, <PgDn>, <PgUp> and <Cr>.  You may exit the 
  277.         form at any time by using <Ctrl-Z>, otherwise a normal exit 
  278.         is accomplished when the last field is exited with a <Cr>.
  279.    
  280.      How to add a Company
  281.    
  282.         To add a Company select Company Maint. from the Main Menu.  
  283.         When the Company Maintenance Menu is presented select Add a 
  284.         Company and a blank record will be presented to you in the 
  285.         Company Edit form.  Type in the data requested by the 
  286.         prompts in the various fields.  When finished with the data 
  287.         entry you will be asked to confirm the addition of the 
  288.         information that you have entered. Select Yes.  The record 
  289.         is now stored in the data file.
  290.    
  291.      How to add a Person
  292.    
  293.         To add a Person select Person Maint. from the Main Menu.  
  294.         When the Person Maintenance Menu is presented select Add a 
  295.         Person and a blank record will be presented to you in the 
  296.         Person Edit form.  Type in the data requested by the 
  297.         prompts in the various fields.  When finished with the data 
  298.         entry you will be asked to confirm the addition of the 
  299.         information that you have entered. Select Yes.  The record 
  300.         is now stored in the data file.
  301.    
  302.      How to add a Contact
  303.    
  304.         From either the Person or Company Maintenance Menus select 
  305.         Contact Add.  You will be prompted for the alpha key of the 
  306.         Company or Person, respectively, that you wish to add.  The 
  307.         data files are searched for the alpha key and the closest 
  308.         match is displayed.  If it is correct select 'Correct' from 
  309.         the Contact Add Menu other wise select one of the other 
  310.         options until you have correct contact displayed then select 
  311.         'Correct'.  You will then be asked for the position that 
  312.         this contact has. Enter it and your done.
  313.    
  314.      How to print a report
  315.    
  316.         Select Reports from the Main Menu and continue to select the 
  317.         options that are presented to you until you get what your 
  318.         after.  Reports can be sent to the printer, the screen, or a 
  319.         file for later printing.  The Contact report may be sent to 
  320.         a file in a format that can be used by other data base 
  321.         programs if desired.  This is available as an example as 
  322.         apposed to being a normal part of this program.
  323.    
  324.        
  325.    
  326.                 Mail Manager Users & Programming Guide   Page  9    
  327.    
  328.    
  329.    PROGRAMMERS GUIDE
  330.    
  331.    CONCEPT
  332.    
  333.    The idea behind MMGR was to create a program that would 
  334.    demonstrate the user interface provided by Harden Consulting in 
  335.    it's application programs.  What grew out of the project was a 
  336.    frustration with dealing with the low level data file and index 
  337.    file routines common to most data base toolboxes.  Ultimately, an 
  338.    Object Oriented approach towards DataBase Management was taken.  
  339.    The InterFace and DataBase management routines were rewritten 
  340.    from an Object Oriented perspective.  This allowed for all the 
  341.    functionality of the previous toolbox routines but gave the added 
  342.    benefit of extensibility and ease of use.
  343.    
  344.    FILE STRUCTURE
  345.    
  346.    The file structure used in this program was derived using Entity 
  347.    Relational Analysis.  The assumption was that I would be dealing 
  348.    primarily with persons that had a relationship with a company.
  349.    
  350.    One could take a flat file approach and create a single file that 
  351.    incuded all the information required for a contact within a 
  352.    company.  If you dealt with only one individual in each company 
  353.    and that individual only had a position at a single company then 
  354.    this would be the rational approach.  Though, in the real world 
  355.    one might be dealing with more than one person at a company and 
  356.    also an individual could be dealing with more than one 
  357.    company, i.e.- a consultant.  Thus, a flat file approach would 
  358.    could lead to a tremendous amount of data redundency.
  359.    
  360.    What we actual have then is a potential many to many 
  361.    relationship between the primary entities, companies and persons. 
  362.    Using the ERA methodology, I created records for each record that 
  363.    contained the information I wanted to keep for each entity.  To 
  364.    this was added a field that would uniquely identify each instance 
  365.    of that record.  In this case a system generated numericly based 
  366.    code was used.  To handle the many to many relation that existed 
  367.    I created a third record structure that described the 
  368.    relationship between the two intities that resolved the Many to 
  369.    Many relationship to a One to Many relationship from either 
  370.    perspective.
  371.    
  372.    At this point the data and index files that would be required to 
  373.    implement this are:
  374.    
  375.         1) Company data file
  376.         2) Person Data File
  377.         3) Contact Data File
  378.         4) company code index file
  379.         5) person code index file
  380.         6) contact company code index file
  381.         7) contact person code index file
  382.    
  383.    These files will allow the computer to relate company records to 
  384.    person records correctly and efficiently.    
  385.    
  386.                 Mail Manager Users & Programming Guide   Page  10   
  387.    
  388.    
  389.    
  390.    A problem exists though.  People will be using this system.  They 
  391.    will be wanting to access this information and numeric codes are 
  392.    not a very user friendly approach to this.  Consequently, two 
  393.    additional index files are used, both Alphabeticly arranged for 
  394.    user friendly access:
  395.    
  396.         1)Company Alpha index file and 
  397.         2) Person Alpha index file.  
  398.    
  399.    The Data and Index files now involved are listed below:
  400.    
  401.         DataFile       IndexFile      Key Type       User
  402.         ----------------------------------------------------------
  403.         COMPANY.DAT    COMPCODE.NDX   CODE           SYSTEM
  404.            "           COMPALPH.NDX   ALPHAKEY       USER
  405.         CONTACT.DAT    CONTCCD.NDX    CODE           SYSTEM
  406.            "           CONTPCD.NDX    CODE           SYSTEM
  407.         PERSON.DAT     PRSNCODE.NDX   CODE           SYSTEM
  408.            "           PRSNALPH.NDX   ALPHAKEY       USER
  409.    
  410.    Now this simple task of tracking business contacts has turned to 
  411.    a relative complex task.  Our data base consists of 9 files that 
  412.    must be manipulated and maintained.  The implecation is that a 
  413.    nightmare of tedious calls to different routines for each index 
  414.    and data file will have to made to manage the editing, addition 
  415.    and deletion of records within the database.  I'm lazy.  I don't 
  416.    like to deal with this tedium.
  417.    
  418.        
  419.    
  420.                 Mail Manager Users & Programming Guide   Page  11   
  421.    
  422.    
  423.    FILE MANAGEMENT
  424.    
  425.    Because of this laziness, I ask myself, since the maintenance of 
  426.    a database system is really fairly cut and dried why couldn't a 
  427.    set of procedures be developed to handle the tedium. ObjectBase 
  428.    is born.
  429.    
  430.    ObjectBase is an Object Oriented approach to this problem.  The 
  431.    DB object is informed of the data and index files that will be 
  432.    included in its data base.  The data and index files are also 
  433.    Objects that have been informed of the source of their data and 
  434.    have been given the know how to be self maintaining.  What I mean 
  435.    by this is the Index File Object is aware of the spot in system 
  436.    memory where its Key value is located and knows what to do with 
  437.    it.  The Data File Object knows which indexes are associated with 
  438.    the data file and also knows where its data buffer is located.  
  439.    The DB Object knows which Data Files belong to the DataBase and 
  440.    how they relate to each other.  By endowing the DB Object with 
  441.    this knowledge, it can now handle most of the maintenance chores 
  442.    with which the programmer normally has to contend.
  443.    
  444.    For instance, when a record is edited, before putting the record 
  445.    back in the database the datafile checks to see if their has been 
  446.    a change in its data buffer if so it then stores the modified 
  447.    copy of the record over the old copy and calls on its indexes to 
  448.    do the same.  They in turn compare the current values of their 
  449.    databuffer with the data that was originally present and will 
  450.    update their index structure accordingly.  What this means to the 
  451.    programmer is that he is no longer required to deal with the 
  452.    tedium of insuring that all files have been updated.
  453.    
  454.    The relational aspects are also handled by the DB Object.  Once 
  455.    informed of the relationships required for a particular 
  456.    application or procedure a call to associate will fill the 
  457.    various record buffers with related data.  If the relationship is 
  458.    a one to many relationship you can use next association to step 
  459.    through the related records.  It makes the associations appear to 
  460.    be a circular Queue.
  461.    
  462.    What all this means is that much of the functionality (and even 
  463.    more) of DBMS systems is provided with the ability to control the 
  464.    environment and interface to the user with the power of Turbo 
  465.    Pascal.
  466.    
  467.        
  468.    
  469.                 Mail Manager Users & Programming Guide   Page  12   
  470.    
  471.    
  472.    INTERFACE
  473.    
  474.    The file management headache has been solved. ObjectBase to the 
  475.    rescue.  The remaining problem, interacting with the user, still 
  476.    looms.
  477.    
  478.    When programming a user interface certain characteristics are 
  479.    important.  Among these are completeness, consistency, 
  480.    intuitiveness, error trapping, informative prompts, etc.  My 
  481.    experience has been that the user interface soon becomes the most 
  482.    time consuming portion of the programmers task.  The larger the 
  483.    project the greater the variation from one program module to 
  484.    next.  ObjectInterFace is born.
  485.    
  486.    ObjectInterFace is an Object Oriented approach to solving the 
  487.    problems of building user friendly interfaces with out spending 
  488.    excessive amounts of time in the process.  The dialog between the 
  489.    program and the user should be as fast and simple as possible.  
  490.    To this end, I again chose an Object Oriented approach.
  491.    
  492.    There are three basic types of objects that have been created.  
  493.    They are a:
  494.    
  495.         1) A Help window object
  496.         2) A Menu object
  497.         3) A Form object.
  498.    
  499.    All are based on the common Window object.  A related type of 
  500.    object is also a part of the system and that is an interface 
  501.    field object.  These are utilized by the other objects.  This 
  502.    approach allows the programmer to modularize his program into 
  503.    declarations of the different objects required and then call them 
  504.    as required without the fuss normally associated with this aspect 
  505.    of the programming task.
  506.    
  507.    ObjectInterface Provides to the programmer the Objects required to 
  508.    perform the following:
  509.    
  510.         1) Present Popup Menus
  511.         2) Present Popup Forms for data entry, editing and display, 
  512.         3) Present Popup Messages
  513.         4) Present Popup Queries
  514.         5) Present Popup Dialog Windows
  515.         6) Present Context Sensitive Help Windows
  516.         7) Allow for Varified Data Entry.
  517.    
  518.    The Forms Object provides the ability to create a popup data 
  519.    entry, edit, and display form that utilizes a list of field 
  520.    objects that the programmer loads into a particular instance of 
  521.    the form object.
  522.    
  523.    The Fields Object provides for the consistant presentation of 
  524.    data for entry, editing, and display.  The types of information 
  525.    that can be handled with the basic package are: 
  526.    
  527.         1) Strings     
  528.    
  529.                 Mail Manager Users & Programming Guide   Page  13   
  530.    
  531.    
  532.         2) Formatted strings
  533.         3) Varified Dates
  534.         4) Integers within specified range
  535.         5) Real numbers within specified range
  536.         6) Currency within specified range
  537.         7) Varified Time
  538.         8) Pick fields 
  539.         9) Boolean Fields
  540.        10) Conditional fields tied to either numeric, boolean, 
  541.            or string values of other fields
  542.    
  543.    The menus Object allows for easy presentation of menus with the 
  544.    ability to stack them or show them independently.  
  545.    
  546.    The Helpwindow object allows you easily construct a context 
  547.    sensitive help system that is always available to the user.
  548.    
  549.    CONCLUSION
  550.    
  551.    The utilization of ObjectBase and ObjectInterface in the 
  552.    construction of application programs can insure a user friendly, 
  553.    powerful application without spending time on the tedium usually 
  554.    associated with the more complex aspects of data base application 
  555.    programming.
  556.     
  557.    The developer can spend his or her time where it belongs, solving 
  558.    the problem that he or she was hired to solve in a cost effective 
  559.    way.
  560.